package com.colin.app.activity.view.picker.number;

import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
import android.widget.EditText;
import android.widget.NumberPicker;

/**
 * Created by Administrator on 2017/6/21.
 */

public class MyNumberPicker extends NumberPicker {
    public MyNumberPicker(Context context) {
        this(context, null, 0);
    }

    public MyNumberPicker(Context context, AttributeSet attrs) {
        this(context, attrs, 0);
    }

    public MyNumberPicker(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    @Override
    public void addView(View child, int index, ViewGroup.LayoutParams params) {
        if (child instanceof EditText) {
            ((EditText) child).setTextColor(0xFFFFFFFF);
            ((EditText) child).setTextSize(18);
            child.setEnabled(false);
            child.setSelected(false);
        }
        super.addView(child, index, params);

    }
}
